import request from '@/config/axios'

// 账单标签 VO
export interface TagVO {
  id: number // ID
  tag: string // 标签名
  remark: string // 备注
  orderNum: number // 排序号
}

// 账单标签 API
export const TagApi = {
  // 查询账单标签分页
  getTagPage: async (params: any) => {
    return await request.get({ url: `/bill/tag/page`, params })
  },

  // 查询账单标签详情
  getTag: async (id: number) => {
    return await request.get({ url: `/bill/tag/get?id=` + id })
  },

  // 新增账单标签
  createTag: async (data: TagVO) => {
    return await request.post({ url: `/bill/tag/create`, data })
  },

  // 修改账单标签
  updateTag: async (data: TagVO) => {
    return await request.put({ url: `/bill/tag/update`, data })
  },

  // 删除账单标签
  deleteTag: async (id: number) => {
    return await request.delete({ url: `/bill/tag/delete?id=` + id })
  },

  // 导出账单标签 Excel
  exportTag: async (params) => {
    return await request.download({ url: `/bill/tag/export-excel`, params })
  }
}